import request from '@/utils/request'

// 查询出库列表
export function listSellGoods(query) {
  return request({
    url: '/shop/sellGoods/list',
    method: 'get',
    params: query
  })
}

// 查询出库详细
export function getSellGoods(id) {
  return request({
    url: '/shop/sellGoods/' + id,
    method: 'get'
  })
}

// 新增出库
export function addSellGoods(data) {
  return request({
    url: '/shop/sellGoods',
    method: 'post',
    data: data
  })
}

// 修改出库
export function updateSellGoods(data) {
  return request({
    url: '/shop/sellGoods',
    method: 'put',
    data: data
  })
}

// 删除出库
export function delSellGoods(id) {
  return request({
    url: '/shop/sellGoods/' + id,
    method: 'delete'
  })
}

//根据id查询入库信息
export function updateSellGoodsStatus(data){
  return request({
    url: '/shop/sellGoods/updateSellGoods',
    method:'put',
    data:data
  })
}

//根据出库状态筛选出库信息
export function getStatusSellGoods(data) {
  return request({
    url: '/shop/sellGoods/getStatusBySell',
    method: 'get',
    params:data
  })
}

//根据待确定出库状态筛选出库数量
export function getSellNumConfirm(data){
  return request({
    url: '/shop/sellGoods/getSellNumConfirm/'+data,
    method: 'get',

  })
}
